package com.yang;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @author: Billyang
 * @date: 2024/10/4 17:24
 */
@Component
public class HelloListener {

    @KafkaListener(topics="test")
    public void onMessage(String message) {
        //todo kafka的消息可靠性是如何保障的，有没有类似与rabbitmq的ack机制
        System.out.println("receive message: " + message);
    }
}
